import request from '@/config/axios'

// 招生资格审查评委 VO
export interface ReviewJudgesVO {
  id: number // 主键
  userId: number // 评委id
  batchId: string // 批次id
  nickname: string // 教师姓名
  jobCode: string // 工号
  mobile: string // 手机号码
  deptName: string // 部门名称
  zcm: string // 职称码
  workingStatus: string // 工作状态
  remark: string // 备注
}

// 已选评委VO
export interface ReviewSelectedJudgesVO {
  id: number // 主键
  nickname: string // 教师姓名
  jobCode: string // 工号
  mobile: string // 手机号码
  deptName: string // 部门名称
  zcm: string // 职称码
  workingStatus: string // 工作状态
  userId: number // 教师id
}

// 招生资格审查批次-设置评委 API
export const ReviewBatchJudgesApi = {
  // 查询指定招生资格审查批次已选的评委分页
  getSelectedMentorByBatchId: async (params: any) => {
    return await request.get({ url: `/recruit/review-judges/selected-judges`, params })
  },

  // 新增指定招生资格审查批次的评委
  addReviewJudges: async (batchId: string, data: Partial<ReviewJudgesVO>[]) => {
    return await request.post({ url: `/recruit/review-judges/create/${batchId}`, data })
  },

  // 为指定招生资格审查批次移除评委
  removeReviewJudges: async (ids: number[]) => {
    return await request.delete({ url: `/recruit/review-judges/delete?ids=${ids}` })
  }
}
